
#ifndef _MEMBER_BCONE_H_
#define _MEMBER_BCONE_H_

#include <BConvexHull>

#define convex_member(convex)		((member_BConvexHull*)((BConvexHull*)convex)->_ptr)

namespace BWE
{
	class member_BConvexHull
	{
	public:
		member_BConvexHull(BConvexHull* convexHull);
		~member_BConvexHull();

		void rebuild();
		bool intersectPlanes(const BPlane& p1, const BPlane& p2, const BPlane& p3, BVector& out) const;
		bool intersectsSegment(const BLine& line) const;

		BConvexHull*		boss;
		BArray<BPlane>		planes;
		BArray<BVector>		vertices;
		BArray<BIntArray>	faces;
	};
}

#endif